{extend name="public/base" /}
{block name='content'}
{include file='public/content_header' /}
<!--数据列表页面-->
<section class="content">

    <!--顶部搜索筛选-->
    <div class="row">
        <div class="col-md-12">
            <div class="box">
                <div class="box-body">
                    <form class="form-inline searchForm" id="searchForm" action="{:url('highindex')}" method="GET">
                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$member_id ? $member_id : '' ;}"
                                   name="member_id" id="member_id" class="form-control input-sm"
                                   placeholder="用户融云ID搜索">
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$me_uid ? $me_uid : '' ;}"
                                   name="me_uid" id="me_uid" class="form-control input-sm"
                                   placeholder="用户UID/昵称 搜索">
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$add_time|default=''}" readonly name="add_time" id="add_time"
                                   class="form-control input-sm indexSearchDateRange" placeholder="发布时间搜索">
                        </div>
                        <script>
                            laydate.render({
                                elem: '#add_time',
                                range: true,
                            });
                        </script>

                        <div class="form-group" style="padding-top: 3px;">
                            <button class="btn btn-sm btn-primary" type="submit"><i class="fa fa-search"></i> 查询
                            </button>
                        </div>

                        <div class="form-group" style="padding-top: 3px;">
                            <button onclick="clearSearchForm()" class="btn btn-sm btn-default" type="button"><i
                                    class="fa  fa-eraser"></i> 清空查询
                            </button>
                        </div>
                    </form>

                    <form class="form-inline searchForm" id="sortForm" action="{:url('highindex')}" method="GET">

                        <div class="form-group" style="padding-top: 3px;">
                            <select name="px" id="px" class="form-control input-sm index-search">
                                <option value="1"{if !isset($px) || $px=='1'}selected{/if}>按获赞数排序</option>
                                <option value="2"{if isset($px) && $px=='2'}selected{/if}>按评论数排序</option>
                                <option value="3"{if isset($px) && $px=='3'}selected{/if}>按收藏数排序</option>
                                <option value="4"{if isset($px) && $px=='4'}selected{/if}>按分享数排序</option>
                            </select>
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <button class="btn btn-sm btn-primary" type="submit"><i class="fa fa-search"></i> 排序
                            </button>
                        </div>

                        <div class="form-group" style="padding-top: 3px;">
                            <button onclick="clearSearchForm()" class="btn btn-sm btn-default" type="button"><i
                                    class="fa  fa-eraser"></i> 清空排序
                            </button>
                        </div>
                    </form>
                </div>

            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-12">
            <div class="box">


                <div class="box-body table-responsive">
                    <table class="table table-hover table-bordered datatable" width="100%">
                        <thead>
                        <tr style="white-space: nowrap">
                            <td style="text-align: center;">
                                <input id="dataCheckAll" type="checkbox" onclick="checkAll(this)" class="checkbox"
                                       placeholder="全选/取消">
                            </td>
                            <th style="text-align: center;width: 5%">视频ID</th>
                            <th style="text-align: center;width: 15%">发布者</th>
                            <th style="text-align: center;width: 5%">标签</th>
                            <th style="text-align: center;width: 10%">描述</th>
                            <th style="text-align: center;width: 5%">封面</th>
                            <th style="text-align: center;width: 5%">短视频</th>
<!--                            <th style="text-align: center;width: 5%">浏览量</th>-->
                            <th style="text-align: center;width: 5%">获赞量</th>
                            <th style="text-align: center;width: 5%">评论量</th>
                            <th style="text-align: center;width: 5%">收藏量</th>
                            <th style="text-align: center;width: 5%">分享量</th>
                            <th style="text-align: center;width: 5%">作品状态</th>
                            <th style="text-align: center;width: 5%">展示状态</th>
                            <th style="text-align: center;width: 5%">是否删除</th>
                            <th style="text-align: center;width: 5%">发布时间</th>
                            <th style="text-align: center;width: 10%">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach name='data' id='item' key='data_key'}
                        <tr>
                            <td style="text-align: center;vertical-align: middle;">
                                <input type="checkbox" onclick="checkThis(this)" name="data-checkbox"
                                       data-id="{$item.id}" class="checkbox data-list-check" value="{$item.id}"
                                       placeholder="选择/取消">
                            </td>
                            <td style="text-align: center;vertical-align: middle;">{$item.id}</td>
                            <td style="text-align: center;vertical-align: middle;"><span style="color: red">【</span> 融云ID：{$item.member_id}<span style="color: red">】</span><span style="color: red">【</span>UID：{$item.me_uid}<span style="color: red">】</span><span style="color: red">【</span>昵称：{$item.me_nick_name}<span style="color: red">】</span></td>
                            <td style="text-align: center;vertical-align: middle;">{$item.label_name}</td>
                            <td style="text-align: center;vertical-align: middle;" title="{$item.short_content}">{$item.short_content_word}</td>
                            <td style="text-align: center;vertical-align: middle;" class="photo-list"><img class="dataListImg" src="{$item.cover_url}"></td>
                            <td style="text-align: center;vertical-align: middle;" class="">
                                <video width="130" height="70" controls>
                                <source src="{$item.video_url}" type="video/mp4">
                            </video>
                            </td>
<!--                            <td style="text-align: center;vertical-align: middle;">{$item.see_num}</td>-->
                            <td style="text-align: center;vertical-align: middle;">{$item.like_num}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.comment_num}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.collection_num}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.share_num}</td>

                            {if $item.status==1}
                            <td style="text-align: center;vertical-align: middle;color: green;">{$item.status_word}
                            </td>
                            {else/}
                            <td style="text-align: center;vertical-align: middle;color: red;">{$item.status_word}
                            </td>
                            {/if}

                            <td style="text-align: center;vertical-align: middle;">{$item.is_show_word}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.is_delete_word}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.add_time}</td>
                            <td style="text-align: center;vertical-align: middle;">

                                <a data-id="{$item.id}" data-url="getexposureinfo" data-confirm="2" data-type="2"
                                   class="btn btn-default btn-xs AjaxButton"  title="推广详情" data-toggle="tooltip">
                                    <span>作品详情</span>
                                </a>

                            </td>
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                </div>

                <!-- 数据列表底部 -->
                <div class="box-footer">
                    {$page|raw}
                    <label class="control-label pull-right" style="margin-right: 10px; font-weight: 100;">
                        <small>共{$total}条记录</small>&nbsp;
                        <small>每页显示</small>
                        &nbsp;
                        <select class="input-sm" onchange="changePerPage(this)">
                            <option value="10" {if $admin.per_page==10}selected{/if}>10</option>
                            <option value="20" {if $admin.per_page==20}selected{/if}>20</option>
                            <option value="30" {if $admin.per_page==30}selected{/if}>30</option>
                            <option value="50" {if $admin.per_page==50}selected{/if}>50</option>
                            <option value="100" {if $admin.per_page==100}selected{/if}>100</option>
                        </select>
                        &nbsp;
                        <small>条记录</small>
                    </label>
                </div>

            </div>
        </div>
    </div>
</section>
<script>
    $(function () {
        $('.photo-list img').on('click', function () {
            layer.photos({
                photos: '.photo-list',
                shadeClose: false,
                closeBtn: 2,
                anim: 5
            });
        })
    });
</script>
{/block}

